import Vue from 'vue'
import VueRouter from 'vue-router'
const home = ()=>import(/* webpackChunkName: "about" */ '../views/home.vue')
// component: function () {
//   return import(/* webpackChunkName: "about" */ '../views/About.vue')
// }
import demo from '../views/demo'
import html from '../views/html'
import css from '../views/css'
import js from '../views/js'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: home
  },
  {
    path: '/home',
    name: 'home',
    component: home
  },
  {
    path: '/html',
    name: 'html',
    component: html
  },
  {
    path: '/css',
    name: 'css',
    component: css
  },
  {
    path: '/js',
    name: 'js',
    component: js
  },
  {
    path: '/temp',
    name: 'temp',
    component: demo
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
